x86/traps: Misc non-functional improvements to set_debugreg()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Mar 2018 20:26:34 +0000 (20:26 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Apr 2018 14:12:36 +0000 (15:12 +0100)
commita50238afa99c27f2aa4eb4e8060f3b81e8ed0d78
tree327b2988d55a864632958934fe1ef71f8781b762
parentf539ae27061c6811fd5e80e0755bf0514e22b977
x86/traps: Misc non-functional improvements to set_debugreg()

 * Change 'int i' to being unsigned, and move it into its most narrow scope.
 * Fold the access_ok() checks for %dr{0..3}.  This halves the compiled size
   of the function.
 * Additional newlines in appropriate places.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/traps.c